Skip to content

Conversation

maxkorp
Copy link
Contributor

@maxkorp maxkorp commented Aug 1, 2025

This causes a fake test suite of e2e tests (to be replaced with the real tests once those are in better shape) on every PR.

Also does some small maintenance to allow us to use this for contract testing, like removing some unneeded use of MDXProvider that was getting into some sort of hoisting issue and causing obscure type errors. We're passing in the components anyways so we don't need the provider.

Also fixes a small bug with loading the dojo when readme's are missing, and bumps pnpm version to 10.something.somethingelse.

@maxkorp maxkorp force-pushed the max/dojo-e2e-config branch 3 times, most recently from 250fcf5 to 60f85e9 Compare August 2, 2025 04:29
run: |
node ../scripts/run-dojo-everything.js &
npx wait-port 9999
sleep 10
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this leave us open to flakey tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could but so far even in CI everything is running in <5 seconds from dojo coming up, so I figured 10 seconds is a big enough buffer.

Ideally we can add a health check to all of the agents and make sure they're all running before we move on, but I didn't want to block on that.


const nextConfig: NextConfig = {
/* config options here */
output: "standalone",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did we change this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had added this before for the old contract testing, but since we're not deploying this, I can take it back out. It makes the startup process more consistent to not have this when linking in copilotkit local-dev versions.


if __name__ == "__main__":
agui_app.serve(app="agent:app", host="0.0.0.0", port=9001, reload=True)
port = int(os.getenv("PORT", "9001"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Were these docs out of date and you're just updating?

Copy link
Contributor Author

@maxkorp maxkorp Aug 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The old version forced running on port 9001. Now it looks for a PORT environment variable, and if that's not present, defaults to 9001. Just makes it easier to run agents locally if you can configure their port (so we can avoid collisions)

@maxkorp maxkorp force-pushed the max/dojo-e2e-config branch from b273899 to 072d359 Compare August 4, 2025 20:09
@maxkorp
Copy link
Contributor Author

maxkorp commented Aug 4, 2025

Small comment, removed the pnpm lock file from the dojo because it's unused, it just uses the root one.

@maxkorp maxkorp merged commit febfd49 into main Aug 4, 2025
5 checks passed
@maxkorp maxkorp deleted the max/dojo-e2e-config branch August 4, 2025 20:47
@contextablemark
Copy link
Contributor

contextablemark commented Aug 6, 2025

@maxkorp fwiw, I found the timing on the tests to be a bit finicky, at least when running against the ADK implementation. Here's what I ended up with, which works somewhat reliably :

https://github.com/Contextable/ag-ui/blob/adk-middleware/typescript-sdk/apps/dojo/e2e2/tests/adk-middleware-agentic-chat.spec.ts

mattsp1290 pushed a commit to mattsp1290/ag-ui that referenced this pull request Sep 8, 2025
* Add scripts for running dojo for e2e

* make examples have configurable ports

* Add new temp e2e suite

* Add github workflow to run on PRs

* misc file cleanup

* Fix runtime error if no readme

* remove unneeded mdx providers to allow build

* bump pnpm to 10.13.1 to align with copilotkit repo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants